package happy.diandiankong.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Title.
 * <p>
 * Description.
 *
 * @author Bill Lv {@literal <billcc.lv@hotmail.com>}
 * @version 1.0
 * @since 2016-08-10
 */
public class SearchCriteria implements Serializable {
    @NotNull
    Long category;
    Integer status;
    Integer sort; // 0. sort by createTime
    @NotNull
    Integer page;
    @NotNull
    Integer size;

    public SearchCriteria() {
    }

    public SearchCriteria(Long category, Integer status, Integer sort, Integer page, Integer size) {
        this.category = category;
        this.status = status;
        this.sort = sort;
        this.page = page;
        this.size = size;
    }

    @JsonProperty
    public Long getCategory() {
        return category;
    }

    @JsonProperty
    public Integer getStatus() {
        return status;
    }

    @JsonProperty
    public Integer getSort() {
        return sort;
    }

    @JsonProperty
    public Integer getPage() {
        return page;
    }

    @JsonProperty
    public Integer getSize() {
        return size;
    }
}
